package com.navi.loaddata.core.mysqlEntity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ghost on 2018/7/19.
 */
@Entity
@Table(name = "eda_measure_defecttype_d", schema = "ch_qms", catalog = "")
@IdClass(EdaMeasureDefecttypeDPK.class)
public class EdaMeasureDefecttypeD {
    private String shop;
    private String defectCode;
    private String type;
    private String description;
    private String evtUser;
    private Timestamp evtTimestamp;
    private String validFlg;
    private String sG;
    private String orientation;

    @Id
    @Column(name = "SHOP")
    public String getShop() {
        return shop;
    }

    public void setShop(String shop) {
        this.shop = shop;
    }

    @Id
    @Column(name = "DEFECT_CODE")
    public String getDefectCode() {
        return defectCode;
    }

    public void setDefectCode(String defectCode) {
        this.defectCode = defectCode;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "DESCRIPTION")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "EVT_USER")
    public String getEvtUser() {
        return evtUser;
    }

    public void setEvtUser(String evtUser) {
        this.evtUser = evtUser;
    }

    @Basic
    @Column(name = "EVT_TIMESTAMP")
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Basic
    @Column(name = "VALID_FLG")
    public String getValidFlg() {
        return validFlg;
    }

    public void setValidFlg(String validFlg) {
        this.validFlg = validFlg;
    }

    @Id
    @Column(name = "S_G")
    public String getsG() {
        return sG;
    }

    public void setsG(String sG) {
        this.sG = sG;
    }

    @Basic
    @Column(name = "ORIENTATION")
    public String getOrientation() {
        return orientation;
    }

    public void setOrientation(String orientation) {
        this.orientation = orientation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EdaMeasureDefecttypeD that = (EdaMeasureDefecttypeD) o;

        if (shop != null ? !shop.equals(that.shop) : that.shop != null) return false;
        if (defectCode != null ? !defectCode.equals(that.defectCode) : that.defectCode != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (evtUser != null ? !evtUser.equals(that.evtUser) : that.evtUser != null) return false;
        if (evtTimestamp != null ? !evtTimestamp.equals(that.evtTimestamp) : that.evtTimestamp != null) return false;
        if (validFlg != null ? !validFlg.equals(that.validFlg) : that.validFlg != null) return false;
        if (sG != null ? !sG.equals(that.sG) : that.sG != null) return false;
        if (orientation != null ? !orientation.equals(that.orientation) : that.orientation != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = shop != null ? shop.hashCode() : 0;
        result = 31 * result + (defectCode != null ? defectCode.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (evtUser != null ? evtUser.hashCode() : 0);
        result = 31 * result + (evtTimestamp != null ? evtTimestamp.hashCode() : 0);
        result = 31 * result + (validFlg != null ? validFlg.hashCode() : 0);
        result = 31 * result + (sG != null ? sG.hashCode() : 0);
        result = 31 * result + (orientation != null ? orientation.hashCode() : 0);
        return result;
    }
}
